﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraBars.Ribbon;
namespace NotebookS2
{
    public partial class CRYSTAL_SO_TOP5_AGENT_PARAM : RibbonForm
    {
        public CRYSTAL_SO_TOP5_AGENT_PARAM()
        {
            InitializeComponent();
        }

        public Form MdiParentForm { get; set; }
        public string ConnectionString { get; set; }

        private void CRYSTAL_SO_LOG_PARAM_Load(object sender, EventArgs e)
        {
            dateEdit1.EditValue = System.DateTime.Now;
            dateEdit2.EditValue = System.DateTime.Now;
            //this.StartPosition = FormStartPosition.CenterParent;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            CRYSTAL_SO_TOP5_AGENT oForm = new CRYSTAL_SO_TOP5_AGENT();

            oForm.ConnectionString = this.ConnectionString;
            oForm.FromDate = (DateTime)dateEdit1.EditValue;
            oForm.ToDate = (DateTime)dateEdit2.EditValue;
            oForm.MdiParent = this.MdiParentForm;
            oForm.Show();

            this.Close();

        }
    }
}
